The present invention relates to a driveshaft having drive elements attached to it. In EP-A-No. 0 213 529, there is proposed a process for attaching drive elements such as cams, gears or bearing bushes on a hollow shaft which consists of a commercial tube. The drive elements are slid onto the tube and attached to it by expanding the tube portions underneath, with the material of the tube itself being deformed plastically whereas that of the drive elements is deformed only elastically so that due to the spring-back of the latter a firm fit on the shaft is achieved. Furthermore, in unpublished German Applications No. P 36 33 435.9 and P 37 17 516.5 there are specified dimensioning rules according to which, as a function of the material properties of the tube and drive elements, and especially their modulus of elasticity and yield point, the geometric conditions, e.g. the inner and outer tube diameter have to be determined in order to achieve a non-rotating, force-locking connection between the parts. It has been found that if the invention in particular is applied to camshafts of motor vehicle engines the component dimensions required by these dimensioning rules, for design or weight reasons, cannot always be made available. Furthermore, with some applications, especially if the camshafts are used for motor vehicle engines, it is necessary for the described process also to be capable of connecting drive elements of a brittle and less elastic material, e.g. malleable cast iron, to shafts. In utility model application No. G 87 13 285.0, also unpublished, there is proposed that such drive elements should have axially different material properties in that only parts of them are subjected to hardening processes and expansion is carried out only in those regions of the continuous hollow shaft positioned inside the ductile regions of the drive elements. This proposal is less suitable for fixing those drive elements which overall consist of a material with little elasticity.